import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:photo_view/photo_view.dart';

class WatchImagePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    var args = ModalRoute.of(context).settings.arguments as List;
    return Scaffold(
      body: Swiper(
        itemBuilder: (BuildContext context, int index) {
          return PhotoView(
            imageProvider: CachedNetworkImageProvider(args[index]),
          );
        },
        loop: false,
        itemCount: args.length,
      ),
    );
  }
}
